import { Button, Result } from 'antd'
import React from 'react'
import { FC } from 'react'
import { useHistory } from 'react-router'

const NotFound: FC = () => {
  const router = useHistory()
  const backToHome = () => {
    router.push('/admin/base')
  }
  return (
    <Result
      status='404'
      title='404'
      subTitle='Sorry, the page you visited does not exist.'
      extra={
        <Button type='primary' onClick={backToHome}>
          返回首页
        </Button>
      }
    />
  )
}

export default NotFound
